-- GENERATED SPELL FOR [Dark Necromancer] --


function spell0_28200(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(20812,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28200', 15306, 1)
end

function spell1_28200(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(52498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28200', 18000, 1)
end

function spell2_28200(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(58770,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_28200', 5000, 1)
end

function spell3_28200(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(58772,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_28200', 5000, 1)
end

function spell4_28200(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28200', 3000, 1)
end

function spell5_28200(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(61558,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28200', 2000, 1)
end

function Sorts_28200(pUnit, Event)
local choix_sorts_28200 = math.random(0, 5)
if choix_sorts_28200 == 0 then
pUnit:RegisterEvent('spell0_28200', 1, 1)
end
if choix_sorts_28200 == 1 then
pUnit:RegisterEvent('spell1_28200', 1, 1)
end
if choix_sorts_28200 == 2 then
pUnit:RegisterEvent('spell2_28200', 1, 1)
end
if choix_sorts_28200 == 3 then
pUnit:RegisterEvent('spell3_28200', 1, 1)
end
if choix_sorts_28200 == 4 then
pUnit:RegisterEvent('spell4_28200', 1, 1)
end
if choix_sorts_28200 == 5 then
pUnit:RegisterEvent('spell5_28200', 1, 1)
end
end

function mob28200_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28200', math.random(1500, 3000), 1)
end

function mob28200_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28200_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28200_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28200, 1, 'mob28200_Action')
RegisterUnitEvent(28200, 2, 'mob28200_Leave')
RegisterUnitEvent(28200, 3, 'mob28200_Kill')
RegisterUnitEvent(28200, 4, 'mob28200_Die')
